import request from "../utils/request";

export const getAllKeyAccounts = () => {
    return request.get("api/getAllKeyAccounts");
}

export const setAccountsStatus = (id) => {
    const data = new FormData();
    data.append("_id", id);
    return request.post("/api/setAccountsStatus", data)
}

export const getSetup = () => {
    return request.get("/api/getSetup");
}

export const changeSetup = (data) => {
    const formData = new FormData();
    Object.keys(data).forEach(key => {
        formData.append(key, data[key])
    })
    return request.post("api/changeSetup", formData)
}

export const getOrderList = () => {
    return request.get("/api/getAllOrder"); 
}